from django.db import models
from utils.BaseModel import BaseModel
# Create your models here.
class Nav(BaseModel):
    name = models.CharField(max_length=20,verbose_name='导航名称')
    position = models.IntegerField(default=0,verbose_name='导航位置')# 0 头部 1 尾部
    link = models.CharField(max_length=100,verbose_name='导航链接',default="")
    class Meta:
        db_table = 'fgnav'
    def __str__(self):
        return self.name



class Banner(BaseModel):
    title = models.CharField(max_length=100,verbose_name='标题')
    image = models.ImageField(upload_to='uploads/banner',verbose_name='图片')
    link = models.CharField(max_length=100,verbose_name='链接',default="")
    class Meta:
        db_table = 'fgbanner'
    def __str__(self):
        return self.title


